using Godot;
using System;
[GlobalClass]


public partial class ReachTask : Tasks
{
	// Called when the node enters the scene tree for the first time.
	public override void _Ready()
	{
		this.CurrentType = Type.REACH;
		var Game = GetNode<Game>("/root/Game");
		MessageManager messageManager = Game.get_message_manager();
		messageManager.MapAdd += TaskComplete;
	}

	// Called every frame. 'delta' is the elapsed time since the previous frame.
	public override void _Process(double delta)
	{
	}
	public void TaskComplete(Map map)
	{
		if(map.MapEnemiesData.name == target)
		{
			ChildTaskComplete(this);
		}
	}
}
